package com.gaff.emp.core.util;

import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import org.springframework.core.io.Resource;


public class XmlUtil {

    public static Element getRootElementFromResource(Resource resource) throws Exception {
        SAXReader reader = new SAXReader();
        Document document = reader.read(resource.getInputStream());
        return document.getRootElement();
    }

}
